<!DOCTYPE html>
<title>'No attribute after removing all entries from an SVGTransformList</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function() {
  var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
  rect.setAttribute('transform', 'matrix(1,0,0,1,0,0)');
  assert_equals(rect.transform.baseVal.length, 1);
  rect.transform.baseVal.removeItem(0);
  assert_equals(rect.transform.baseVal.length, 0);
  assert_false(rect.hasAttribute('transform'));
}, document.title + ' (removeItem).');

test(function() {
  var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
  rect.setAttribute('transform', 'matrix(1,0,0,1,0,0)');
  assert_equals(rect.transform.baseVal.length, 1);
  rect.transform.baseVal.clear();
  assert_equals(rect.transform.baseVal.length, 0);
  assert_false(rect.hasAttribute('transform'));
}, document.title + ' (clear).');

test(function() {
  var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
  rect.setAttribute('transform', 'matrix(1,0,0,1,0,0)');
  assert_equals(rect.transform.baseVal.length, 1);
  rect.transform.baseVal.removeItem(0);
  assert_equals(rect.transform.baseVal.length, 0);
  rect.removeAttribute('transform');
  assert_false(rect.hasAttribute('transform'));
}, document.title + ' and removing the attribute.');
</script>
